package com.hdsx.netty.bio;

import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.io.PrintStream;
import java.net.InetSocketAddress;
import java.net.Socket;

/**
 * @author 占贤银
 * time 2024/7/30 0:17
 * description 生命之灯因热情而点燃，生命之舟因拼搏而前行
 */
public class BioClient {

    public static void main(String[] args) {
        try {
            Socket socket = new Socket();
            socket.connect(new InetSocketAddress("127.0.0.1", 8080));
            OutputStream outputStream = socket.getOutputStream();
            PrintStream ps = new PrintStream(outputStream);
            ps.println("我们都是好人！");
            ps.flush();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
